import React from 'react'
import { createForm } from 'rc-form'
// import { Form, Input, Button } from 'antd-mobile'
import { SetOutline } from 'antd-mobile-icons'
import './My.scss'

import LayoutScroll from '@/components/LayoutScroll/LayoutScroll'

class My extends React.Component {


    componentDidMount() {
        console.log('My');
    }

    // d登陆
    onLogin = () => {
        localStorage.setItem('boke_city', 'boke_city')
    }

    // 注册
    register = async () => {
        const { name, parssward } = this.state;
        console.log( name, parssward);
        let parma ={
            "avatar": "https://avatars.githubusercontent.com/u/33335359?s=60&v=4",
            "email": name,
            "name": name,
            "pass": parssward
          }
        const res = await this.$get_request(this, parma, '用户注册', 'my', 'user')
        if (!res) {
            debugger
            // this.register() 
            return false
        }
    }
    
    // 去注册页面
    goToUser = () => {
        this.props.history.push('/Login')
    }

    render() {
        // const { name, parssward } = this.state;
        return (
            <LayoutScroll name={'my'}>
                <div className='my'>
                    <div className="top-centen">
                        <div className="touxiang">
                            <img src="https://avatars.githubusercontent.com/u/33335359?s=60&v=4" alt="" />
                        </div>
                        <div className="text-content">
                            <div className="text-name">
                                <span onClick={this.goToUser} className="name-title">请登陆</span>
                                {/* <div>vip</div> */}
                            </div>
                            <div className="text-jieshao">
                                <span>版权所有 (C) Microsoft Corporation。保留所有权利</span>
                            </div>
                        </div>
                        <div className="eitd-cont">
                            <SetOutline fontSize={36}/> 
                        </div>
                    </div>
                    
                </div>
            </LayoutScroll>
        )
    }
}

export default createForm()(My);